package com.xm.shop.exceptions;


import com.xm.shop.pojo.vo.RespResult;

/**
 * 项目异常基类
 */
public class ShopException extends RuntimeException {
    //错误状态码
    private int errorCode = RespResult.Code.FAILED.getValue();

    public ShopException() {
    }

    public ShopException(String message) {
        super(message);
    }

    public ShopException(int errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }

    public ShopException(String message, Throwable cause) {
        super(message, cause);
    }

    public ShopException(Throwable cause) {
        super(cause);
    }

    public ShopException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }

    public int getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }
}
